<?php
$nac_s = "SELECT * FROM kontrolaprihlasenia GROUP BY email";
$nac_q = MySQL_Query ($nac_s);

echo '<table>';
echo '<tr><td colspan="3">Zoznam blokovaných používateľov</td></tr>';
$poc = 0;
while ($nac = MySQL_Fetch_Array ($nac_q)){
    $over1_s = "SELECT * FROM kontrolaprihlasenia WHERE email = '".$nac['email']."' ";
    $over1_q = MySQL_Query ($over1_s);
    $over1_n = MySQL_Num_Rows ($over1_q);
    if ($over1_n>=3){
        $poc++;
        echo '<tr>';
        echo '<td>'.$poc.'</td>';
        echo '<td>&nbsp;&nbsp;'.$nac['email'].'</td>';
        echo '<td>&nbsp;&nbsp;&nbsp;&nbsp;Nové heslo: <input name="" id="newPass'.$poc.'" type="password" /></td>';
        echo '<td>&nbsp;&nbsp;<input name="" onclick="unblock(\''.$nac['email'].'\',\'newPass'.$poc.'\')" type="button" value="Odblokovať" /></td>';
        echo '</tr>';
    }
}
echo '</table>';
?>
